package com.wanma.springboot.webcontroller;


import com.wanma.springboot.pojo.Userinfo;
import com.wanma.springboot.service.UserinfoServices;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import java.util.List;

@Controller

public class UserinfoController {
    @Resource
    private UserinfoServices userinfoServices;

//    取所有用户集合
    @RequestMapping("/service/userinfo")
    @ModelAttribute("userinfos")
    public List<Userinfo> selectAllUser()
    {
        return userinfoServices.selectAllUser();
    }
}
